﻿// ASP.NET Web API Sample Application
// by Lee Dumond -- leedumond@gmail.com

namespace ContactManagerCrud.Filters
{
   using System;
   using System.Net;
   using System.Net.Http;
   using System.Web.Http.Filters;

   public class NotImplementedExceptionFilter : ExceptionFilterAttribute
   {
      public override void OnException(HttpActionExecutedContext actionExecutedContext)
      {
         if (actionExecutedContext.Exception is NotImplementedException)
         {
            actionExecutedContext.Response = new HttpResponseMessage(HttpStatusCode.NotImplemented);
         }
      }
   }
}